/**
 * User: alesj
 * Date: 18.3.2006
 * Time: 16:06:26
 * 
 * (C) Genera Lynx d.o.o.
 */

package com.alesj.blade.data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author <a href="mailto:ales.justin@genera-lynx.com">Ales Justin</a>
 */
@Entity
@Table(name = "RECTANGLE")
@Inheritance(strategy = InheritanceType.JOINED)
public class Rectangle implements Serializable {

    Integer id;
    Double width;
    Double height;
    Double edge;

    public String toString() {
        return "[" + width + "," + height + "] (" + edge + ")" ;
    }

    @Id
    @GeneratedValue
    @Column(name = "RECTANGLE_ID")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Double getWidth() {
        return width;
    }

    public void setWidth(Double width) {
        this.width = width;
    }

    public Double getHeight() {
        return height;
    }

    public void setHeight(Double height) {
        this.height = height;
    }

    public Double getEdge() {
        return edge;
    }

    public void setEdge(Double edge) {
        this.edge = edge;
    }

}
